﻿using MyLogging;

namespace MyServices;

public class DeviceService
{
    private readonly IMyLogger _logger;
    public DeviceService(IMyLogger logger)
    {
        _logger = logger;
    }
    public void CheckDevice()
    {
        if (Random.Shared.NextDouble() > 0.5)
        {
            _logger.LogInformation("Device is ok");
        }
        else
        {
            _logger.LogInformation("Device is fail");
        }
    }
}